package com.yzt.zhuju.network.entity.chatroom;

import android.os.Parcel;
import android.os.Parcelable;

import java.io.Serializable;

/**
 * author : bob
 * date   : 2022/12/2
 * desc   :
 */
public class ChatRoomChatMessage implements Parcelable, Serializable {
    private String uid;//发送者id
    private String avatar;//头像
    private String name;//昵称
    private String textColor;// 文本颜色
    private int role; // 角色身份
    private int level;//等级
    private String noble;//贵族
    private String other;//特殊标签
    private String backWear;//背景框
    private int seatId;//0-7普通位，8：主持位
    private int messageType;//0：公告；1：文本；2：图片；3：礼物；4：系统；5：表情；6：红包；
    private String roomIcon;
    private int gameResult;
    private String chatAirUrl;  // 聊天气泡图片
    private boolean enter = false;
    private String filterVersion;
    private ChatRoomDetailInfo.ColorfulFont colorfulFont;
    private int charmsGrade; //魅力或者财富等级
    private int gender; //性别

    private String jumpText;
    private int jumpType;
    private String jumpUrl;

    private boolean showBanner; //是否显示进房横幅

    public ChatRoomChatMessage() {
    }

    protected ChatRoomChatMessage(Parcel in) {
        uid = in.readString();
        avatar = in.readString();
        name = in.readString();
        textColor = in.readString();
        role = in.readInt();
        level = in.readInt();
        noble = in.readString();
        other = in.readString();
        backWear = in.readString();
        seatId = in.readInt();
        messageType = in.readInt();
        roomIcon = in.readString();
        gameResult = in.readInt();
        chatAirUrl = in.readString();
        enter = in.readByte() != 0;
        filterVersion = in.readString();
        charmsGrade = in.readInt();
        gender = in.readInt();
        showBanner = in.readByte() != 0;
        jumpText = in.readString();
        jumpType = in.readInt();
        jumpUrl = in.readString();
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(uid);
        dest.writeString(avatar);
        dest.writeString(name);
        dest.writeString(textColor);
        dest.writeInt(role);
        dest.writeInt(level);
        dest.writeString(noble);
        dest.writeString(other);
        dest.writeString(backWear);
        dest.writeInt(seatId);
        dest.writeInt(messageType);
        dest.writeString(roomIcon);
        dest.writeInt(gameResult);
        dest.writeString(chatAirUrl);
        dest.writeByte((byte) (enter ? 1 : 0));
        dest.writeString(filterVersion);
        dest.writeInt(charmsGrade);
        dest.writeInt(gender);
        dest.writeByte((byte) (showBanner ? 1 : 0));
        dest.writeString(jumpText);
        dest.writeInt(jumpType);
        dest.writeString(jumpUrl);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<ChatRoomChatMessage> CREATOR = new Creator<ChatRoomChatMessage>() {
        @Override
        public ChatRoomChatMessage createFromParcel(Parcel in) {
            return new ChatRoomChatMessage(in);
        }

        @Override
        public ChatRoomChatMessage[] newArray(int size) {
            return new ChatRoomChatMessage[size];
        }
    };

    public String getFilterVersion() {
        return filterVersion;
    }

    public void setFilterVersion(String filterVersion) {
        this.filterVersion = filterVersion;
    }

    public String getUid() {
        return uid;
    }

    public void setUid(String uid) {
        this.uid = uid;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getTextColor() {
        return textColor;
    }

    public void setTextColor(String textColor) {
        this.textColor = textColor;
    }

    public int getRole() {
        return role;
    }

    public void setRole(int role) {
        this.role = role;
    }

    public int getLevel() {
        return level;
    }

    public void setLevel(int level) {
        this.level = level;
    }

    public String getNoble() {
        return noble;
    }

    public void setNoble(String noble) {
        this.noble = noble;
    }

    public String getOther() {
        return other;
    }

    public void setOther(String other) {
        this.other = other;
    }

    public String getBackWear() {
        return backWear;
    }

    public void setBackWear(String backWear) {
        this.backWear = backWear;
    }

    public int getSeatId() {
        return seatId;
    }

    public void setSeatId(int seatId) {
        this.seatId = seatId;
    }

    public int getMessageType() {
        return messageType;
    }

    public void setMessageType(int messageType) {
        this.messageType = messageType;
    }

    public int getGameResult() {
        return gameResult;
    }

    public void setGameResult(int gameResult) {
        this.gameResult = gameResult;
    }


    public String getRoomIcon() {
        return roomIcon;
    }

    public void setRoomIcon(String roomIcon) {
        this.roomIcon = roomIcon;
    }

    public boolean isEnter() {
        return enter;
    }

    public void setEnter(boolean enter) {
        this.enter = enter;
    }

    public String getChatAirUrl() {
        return chatAirUrl;
    }

    public void setChatAirUrl(String chatAirUrl) {
        this.chatAirUrl = chatAirUrl;
    }

    public ChatRoomDetailInfo.ColorfulFont getColorfulFont() {
        return colorfulFont;
    }

    public void setColorfulFont(ChatRoomDetailInfo.ColorfulFont colorfulFont) {
        this.colorfulFont = colorfulFont;
    }

    public int getCharmsGrade() {
        return charmsGrade;
    }

    public void setCharmsGrade(int charmsGrade) {
        this.charmsGrade = charmsGrade;
    }

    public int getGender() {
        return gender;
    }

    public void setGender(int gender) {
        this.gender = gender;
    }


    public String getJumpText() {
        return jumpText;
    }

    public void setJumpText(String jumpText) {
        this.jumpText = jumpText;
    }

    public int getJumpType() {
        return jumpType;
    }

    public void setJumpType(int jumpType) {
        this.jumpType = jumpType;
    }

    public String getJumpUrl() {
        return jumpUrl;
    }

    public void setJumpUrl(String jumpUrl) {
        this.jumpUrl = jumpUrl;
    }
}
